<%--
  Created by IntelliJ IDEA.
  User: 29795
  Date: 2025/3/27
  Time: 下午11:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户列表</title>
</head>
<body>
<a href="/Tshow">展示数据</a>
<table border="1" cellpadding="5">
    <tr>
        <th>编号</th>
        <th>账号</th>
        <th>密码</th>
        <th>角色名称</th>
        <th>权限列表</th>
    </tr>
    <c:forEach items="${p1.list}" var="user">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td>${user.role.rolename}</td>
            <td>
                <ul>
                    <c:forEach items="${user.role.menu}" var="menu">
                        <li>${menu.menu.name} -- ${menu.menu.url}</li>
                    </c:forEach>
                </ul>
            </td>
        </tr>
    </c:forEach>
</table>
[${p1.pageNum}/${p1.pages}]
<a href="/Tshow?pageNum=1">首页</a>
<a href="/Tshow?pageNum=${p1.prePage}">上一页</a>
<c:forEach var="i" items="${p1.navigatepageNums}">
    <a href="/Tshow?pageNum=${i}">${i}</a>
</c:forEach>
<a href="/Tshow?pageNum=${p1.nextPage}">下一页</a>
<a href="/Tshow?pageNum=${p1.pages}">尾页</a>
</body>
</html>
